<?php 
/* 
Proyecto: Sistema Victoria 2.0
Programador: Felipe Guerra
Año: 2015
Flores de tumbabiro ©
*/
require_once('../core/libreria.php');
require_once('../db/connect.php'); 
?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="../css/list.css" /><!--Importante, siempre debe ir antes del css del menu vertical-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>

<!-- title -->
<?php require_once('../core/title.php'); ?> 

<!-- BANNER -->
<?php require_once('../core/banner.php'); ?> 

<!-- Menú superior -->
<?php require_once('../core/menuSuperior.php'); ?> 

</head>

<body <?php require_once('../core/BodyBackground.php'); ?>  >
<br><br><br>
<form action="" method="post" name="form" id="form" >
<table width="100%" border="0">
  <tr>
    <td width="15%" valign="top" >
		<!-- Menú Vertical -->
		<?php require_once('../core/menuVertical.php'); ?> 
    </td>
    <td width="85%" align="center" >
    <!----------------------------------------
    --------------------INICIO----------------
    ----------------------------------------->
    
<!--Estilos de la tabla utilizada para ver y ABC-->
<link rel="stylesheet" href="../css/tabla.css" />

<!--Javascript de la tabla utilizada para ABC-->
<script src="../js/tabla.js"></script>

<?php 
$filaMostrar = $_GET['id'];

//--------------------SELECT INICIO---------------------
mysql_select_db($database_victoria, $victoria );
$query_rsListar = "
SELECT
*
FROM direccion_empresa
WHERE DIR_CODIGO = '$filaMostrar'
";
//--------------------SELECT FIN------------------------

$rsListar = mysql_query($query_rsListar, $victoria ) or die(mysql_error());
$row_rsListar = mysql_fetch_assoc($rsListar);

?>
<table width="80%" border="1" style="background-color:#FFFFFF" class="tabla_css" >
  <tr  id="tr_encabezado" >
    <td colspan="4" id="td_encabezado">
	    Ver registro	
    </td>
  </tr>
  <tr>
    <td width="20%" class="etiqueta" ><strong>Codigo: </strong></td>
    <?php 
	//┌────────────────────────────────┐
	mysql_select_db($database_victoria, $victoria );
	$sql = 
"
SELECT
  PAI_CODIGO,
  PAI_NOMBRE
FROM pais
WHERE PAI_VIGENCIA = 1
AND PAI_CODIGO = ".$row_rsListar['PAI_CODIGO']."
ORDER BY PAI_NOMBRE";
	$tabla = mysql_query($sql, $victoria ) or die(mysql_error());
	$fila = mysql_fetch_assoc($tabla);
	//└────────────────────────────────┘
    ?>
    <td width="20%"><?php echo $fila['PAI_NOMBRE'];?></td>
    <td width="20%" class="etiqueta" ><strong>Codigo: </strong></td>
    <td width="20%"><?php echo $row_rsListar['EMP_CODIGO'];?></td>
  </tr>  
  <tr>
    <td width="20%" class="etiqueta" ><strong>Pais: </strong></td>
    <td width="20%"><?php echo $row_rsListar['DIR_PAIS'];?></td>
    <td class="etiqueta" ><strong>Direccion: </strong></td>
    <td><?php echo $row_rsListar['DIR_DIRECCION'];?></td>
  </tr>
  <tr>
    <td width="20%" class="etiqueta" ><strong>Telefono: </strong></td>
    <td width="20%"><?php echo $row_rsListar['DIR_TELEFONO'];?></td>
    <td class="etiqueta" ><strong>Fax: </strong></td>
    <td><?php echo $row_rsListar['DIR_FAX'];?></td>
  </tr>
  <tr>
    <td width="20%" class="etiqueta" ><strong>Celular: </strong></td>
    <td width="20%"><?php echo $row_rsListar['DIR_CELULAR'];?></td>
    <td class="etiqueta" ><strong>Codigo postal: </strong></td>
    <td><?php echo $row_rsListar['DIR_CODIGO_POSTAL'];?></td>
  </tr>
  <tr>
    <td class="etiqueta" ><strong>Vigencia: </strong></td>
    <td><input disabled="disabled" type="checkbox" <?php echo ($row_rsListar['DIR_VIGENCIA'] == 1 ? 'checked="checked"' : '' );?> /></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
  <tr>
    <td colspan="6" id="td_pie">
      <a href="<?php echo $_GET['pn']?>List.php?ms=<?php echo $_GET['ms']?>" class="btn btn-large" >
        Regresar
        </a>
      </td>
  </tr>
</table>

    <!----------------------------------------
    --------------------FIN-------------------
    ----------------------------------------->
    </td>
  </tr>
</table>
<input id="verify" name="verify" type="hidden" value="verify"></input>
<form>
</body>
</html>